home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 2.8 KB | 108 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWCFMRes.h
- // Release Version: $ 1.0d11 $
- //
- // Copyright: 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWCFMRES_H
- #define FWCFMRES_H
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- #ifndef FWRESFIL_H
- #include "FWResFil.h"
- #endif
-
- #ifndef FWAUTODE_H
- #include "FWAutoDe.h"
- #endif
-
- #if defined(FW_BUILD_MAC) && !defined(__CODEFRAGMENTS__)
- #include <CodeFragments.h>
- #endif
-
- #if defined(SYMANTEC_CPLUS) && !FW_LIB_EXPORT_PRAGMAS
- #pragma internal on
- #endif
-
- //========================================================================================
- // Global Variable
- //========================================================================================
- // FW_gInstance is initialize in InitLibraryResources on the Mac and in DLLMain
- // on Windows 32
-
- extern FW_Instance FW_gInstance;
-
- //========================================================================================
- // Global functions
- //========================================================================================
-
- #ifdef FW_BUILD_MAC
- OSErr InitLibraryResources(CFragInitBlockPtr init);
- #endif
-
- #ifdef FW_BUILD_WIN
- extern "C" BOOL WINAPI DllMain(HINSTANCE hDLL, DWORD dwReason, LPVOID lpReserved);
- #endif
-
- //========================================================================================
- // class FW_CAcquireCFMResourceAccess
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CAcquireCFMResourceAccess FW_AUTO_DESTRUCT_OBJECT
- {
- public:
- FW_CAcquireCFMResourceAccess();
- FW_CAcquireCFMResourceAccess(FW_Instance instance);
- virtual ~FW_CAcquireCFMResourceAccess();
-
- #ifdef FW_BUILD_MAC
-
- short GetLibraryRefNum() const
- {return gLibraryRefNum;}
-
- private:
- void CommonInit(FW_Instance instance);
-
- private:
- static short gLibraryRefCount;
- // # of nested calls to BeginUsingLibRsrcs
- static short gLibraryRefNum;
- // Library refNum; valid when fLibraryRefCount>0.
-
- long fSavedLibraryRefNum;
- #endif
- };
-
- //========================================================================================
- // class FW_CSharedLibraryResourceFile
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CSharedLibraryResourceFile : public FW_CResourceFile
- {
- public:
- FW_CSharedLibraryResourceFile();
- FW_CSharedLibraryResourceFile(FW_Instance instance);
-
- virtual ~FW_CSharedLibraryResourceFile();
-
- private:
- void CommonInit(FW_Instance instance);
-
- private:
- #ifdef FW_BUILD_MAC
- FW_CAcquireCFMResourceAccess fAcquireCFMResourceAccess;
- #endif
- };
-
- #if defined(SYMANTEC_CPLUS) && !FW_LIB_EXPORT_PRAGMAS
- #pragma internal off
- #endif
-
- #endif
-